<%@ page language="java" pageEncoding="utf-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"   %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
 <!-- 数据源的配置 -->
  <sql:setDataSource driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"   url="jdbc:microsoft:sqlserver://127.0.0.1:1433;databaseName=material" 
  user="sa" password="123456" var="db" scope="request"/>
  <!-- 查询相应的信息 -->
  <sql:query var="material" dataSource="${db}">select * from material where maCode=${param.id } </sql:query>
  <c:forEach var="c" items="${material.rows}">


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>main.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%@ include file="header.jsp"%>
    <center>
    <h1>修改物料信息</h1>
    <form action="materialManage.do?flag=change" method="post">
	    <table width="780" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
	    <tr>
		    <td>物料编号：</td><td><input type="text" name="maCode" readonly="readonly" value="${c.maCode}"/>(ReadOnly)</td>
		  </tr>
		   <tr>
		    <td>所在仓库编号：</td><td><input type="text" name="storeCode" value="${c.storeCode }"/></td>
		  </tr>
		  <tr>
		    <td>物料名字：</td><td><input type="text" name="maName" readonly="readonly" value="${c.maName }"/>(ReadOnly)</td>
		  </tr>
		   <tr>
		    <td>库存量：</td><td><input type="text" name="maNum" readonly="readonly" value="${c.maNum }"/>(ReadOnly)</td>
		  </tr>
		   <tr>
		    <td>价&nbsp;&nbsp;格：</td><td><input type="text" name="maPrice" value="${c.maPrice }"/></td>
		  </tr>
		   <tr>
		    <td>供应商：</td><td><input type="text" name="proName" value="${c.proName }"/></td>
		  </tr>
		   <tr>
		    <td><input type="submit" value="保存"/></td><td><input type="reset" value="重置"/></td>
		    <td><a href="materialManage.do?flag=page">返回</a></td>
		  </tr>
	   </table>
   </form>
   </center>

<%@ include file="footer.jsp"%>
  </body>
</html:html></c:forEach>